package com.java.crazy.part16.deadthread;

import com.java.crazy.base.BaseClass;

public class ClassA extends BaseClass {
    public synchronized void initA(ClassB b) {
        try {
            logi("ClassA: init() " + Thread.currentThread().getName() + "");
            Thread.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        logi("ClassA 准备执行: last() ");
        b.last();
    }

    public synchronized void last() {
        logi("ClassA: last() " + Thread.currentThread().getName() + " 执行");
    }
}
